<?php 
/////////////////////////////////////////////////////////////////////////////////////		
include "required_code.php"; 

				session_start();
				$ses_user_id =$_SESSION['ses_user_id'];
				$ses_std_id = $_SESSION['ses_std_id'];
				if($ses_user_id <> session_id() or  $ses_std_id ==''){
					echo "Authentication failed";
					echo "<meta http-equiv='refresh' content='2;URL=index.php' />";
					}    
					
							$query2="SELECT * FROM std_progress WHERE std_id=$ses_std_id";
							$db_result2=db_query($query2);
							$result2=mysql_fetch_array($db_result2);
							//echo $result2['pretest_sts'];
							if($result2['ls_sts']==1){
								echo "Redirecting";
								echo "<meta http-equiv='refresh' content='1;URL=progress.php' />";
							}
							else{
								
		/////////////////////////////////////////////////////////////////////////////////////						
						?>
						
						<table width="800" border="1" align="center" cellpadding="0" cellspacing="0">
						  <tr>
							<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
							  <tr>
								<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
								  <tr>
									<td width="23%" bgcolor="#FFFFFF"><?php include "header.html"; ?></td>
									</tr>
								</table></td>
							  </tr>
							  <tr>
								<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
								  <tr>
								   
									<td width="80%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
									  <tr>
										<td bgcolor="#00CCFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
										  <tr>
											<td><div align="left"><tt>Learning Style Test</tt></div></td>
											<td>&nbsp;</td>
											<td><?php include "right_navi.php"; ?></td>
										  </tr>
										</table></td>
									  </tr>
									  <tr>
										<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
										  <tr>
											<td bgcolor="#FFFFFF"><br />
											  <table width="100%" border="0" cellspacing="0" cellpadding="5">
												<tr>
												  <td><table width="100%" border="1" align="left" cellpadding="0" cellspacing="0">
													<tr>
													  <td><form method="POST" action="ls_test_record.php">
											<table width="100%" border="0" cellspacing="0" cellpadding="0">
											  <tr>
												<td><table width="150" border="0" align="right" cellpadding="0" cellspacing="1">
												  <tr>
												    <td rowspan="2" bgcolor="#94BCE4"><div align="center">Test Item</div></td>
												    <td colspan="4" bgcolor="#94BCE4"><div align="center">Answer</div></td>
												    </tr>
												  <tr>
												    <td bgcolor="#94BCE4"><div align="center">A</div></td>
												    <td bgcolor="#94BCE4"><div align="center">D</div></td>
												    </tr>
												  <?php
												  for ($i=21;$i<=22;$i++){
												  ?>
												  <tr>
												    <td bgcolor="#94BCE4"><div align="center"><?php echo $i; ?></div></td>
												    <td bgcolor="#C0D8EF"><div align="center">
												      <input type="radio" name="item[<?php echo $i; ?>]" value="A" />
												      </div></td>
												    
												    <td bgcolor="#C0D8EF"><div align="center">
												      <input type="radio" name="item[<?php echo $i; ?>]" value="D" />
												      </div></td>
												    </tr>
												  <?php
													}
												  ?>
												  </table>
												  <table width="150" border="0" align="right" cellpadding="0" cellspacing="1">
												    <tr>
												      <td rowspan="2" bgcolor="#94BCE4"><div align="center">Test Item</div></td>
												      <td colspan="4" bgcolor="#94BCE4"><div align="center">Answer</div></td>
											        </tr>
												    <tr>
												      <td bgcolor="#94BCE4"><div align="center">A</div></td>
												      <td bgcolor="#94BCE4"><div align="center">D</div></td>
											        </tr>
												    <?php
												  for ($i=16;$i<=20;$i++){
												  ?>
												    <tr>
												      <td bgcolor="#94BCE4"><div align="center"><?php echo $i; ?></div></td>
												      <td bgcolor="#C0D8EF"><div align="center">
												        <input type="radio" name="item[<?php echo $i; ?>]" value="A" />
												        </div></td>
												      <td bgcolor="#C0D8EF"><div align="center">
												        <input type="radio" name="item[<?php echo $i; ?>]" value="D" />
												        </div></td>
											        </tr>
												    <?php
													}
												  ?>
											      </table>
												  <table width="150" border="0" align="right" cellpadding="0" cellspacing="1">
												    <tr>
												      <td rowspan="2" bgcolor="#94BCE4"><div align="center">Test Item</div></td>
												      <td colspan="4" bgcolor="#94BCE4"><div align="center">Answer</div></td>
											        </tr>
												    <tr>
												      <td bgcolor="#94BCE4"><div align="center">A</div></td>
												      <td bgcolor="#94BCE4"><div align="center">D</div></td>
											        </tr>
												    <?php
												  for ($i=11;$i<=15;$i++){
												  ?>
												    <tr>
												      <td bgcolor="#94BCE4"><div align="center"><?php echo $i; ?></div></td>
												      <td bgcolor="#C0D8EF"><div align="center">
												        <input type="radio" name="item[<?php echo $i; ?>]" value="A" />
												        </div></td>
												      <td bgcolor="#C0D8EF"><div align="center">
												        <input type="radio" name="item[<?php echo $i; ?>]" value="D" />
												        </div></td>
											        </tr>
												    <?php
													}
												  ?>
											      </table>
												  <table width="150" border="0" align="right" cellpadding="0" cellspacing="1">
												    <tr>
												      <td rowspan="2" bgcolor="#94BCE4"><div align="center">Test Item</div></td>
												      <td colspan="4" bgcolor="#94BCE4"><div align="center">Answer</div></td>
											        </tr>
												    <tr>
												      <td bgcolor="#94BCE4"><div align="center">A</div></td>
												      <td bgcolor="#94BCE4"><div align="center">D</div></td>
											        </tr>
												    <?php
												  for ($i=6;$i<=10;$i++){
												  ?>
												    <tr>
												      <td bgcolor="#94BCE4"><div align="center"><?php echo $i; ?></div></td>
												      <td bgcolor="#C0D8EF"><div align="center">
												        <input type="radio" name="item[<?php echo $i; ?>]" value="A" />
												        </div></td>
												      <td bgcolor="#C0D8EF"><div align="center">
												        <input type="radio" name="item[<?php echo $i; ?>]" value="D" />
												        </div></td>
											        </tr>
												    <?php
													}
												  ?>
											      </table>
												  <table width="150" border="0" align="right" cellpadding="0" cellspacing="1">
												    <tr>
												      <td rowspan="2" bgcolor="#94BCE4"><div align="center">Test Item</div></td>
												      <td colspan="4" bgcolor="#94BCE4"><div align="center">Answer</div></td>
											        </tr>
												    <tr>
												      <td bgcolor="#94BCE4"><div align="center">A</div></td>
												      <td bgcolor="#94BCE4"><div align="center">D</div></td>
											        </tr>
												    <?php
												  for ($i=1;$i<=5;$i++){
												  ?>
												    <tr>
												      <td bgcolor="#94BCE4"><div align="center"><?php echo $i; ?></div></td>
												      <td bgcolor="#C0D8EF"><div align="center">
												        <input type="radio" name="item[<?php echo $i; ?>]" value="A" />
												        </div></td>
												      <td bgcolor="#C0D8EF"><div align="center">
												        <input type="radio" name="item[<?php echo $i; ?>]" value="D" />
												        </div></td>
											        </tr>
												    <?php
													}
												  ?>
										        </table></td>
												</tr>
											  </table>
											<div align="center">
										  <input type="submit" value="Submit Test">
												  </div>
													  </form></td>
													</tr>
													<tr>
													  <td><div align="center">LearningStyleTestItems [PDF]</div></td>
													</tr>
												  </table></td>
												</tr>
												<tr>
												  <td></td>
												</tr>
												<tr>
												  <td></td>
												</tr>
											  </table></td>
										  </tr>
										</table></td>
									  </tr>
									</table></td>
								  </tr>
								</table></td>
							  </tr>
							  <tr>
								<td bgcolor="#FFFFFF"><?php include "footer.html"; ?></td>
							  </tr>
							</table></td>
						  </tr>
						</table>
						</body>
						</html>
						<?php
						/////////////////////////////////////////////////////////////////////////////////////		
							$db_close=db_disconnect($db_open);
							}
/////////////////////////////////////////////////////////////////////////////////////		
?>
